home *** CD-ROM | disk | FTP | other *** search
- *** 1.15 1992/03/09 18:12:41
- --- Changelo 1992/04/19 16:36:09
- ***************
- *** 179,181 ****
- --- 179,215 ----
- open the log file when buffer fills up, dump buffer, close file
- and so on.
- ------------------------------- Patchlevel 17 -----------------------------
- +
- + many places:: ++jrb
- + undo all changes since PL 17, because nothing was working. Sigh!
- +
- + atarist.c:: andreas
- + (st_execle_kludge): convert PATH as in spawn..;
- + don't do anything but longjmp after Pexec because the stack is
- + *very* small!
- + (re_comp): free compiled regex
- + (st_child_read_word, st_child_write_word): handle bus errors
- + (kill): allow GDB output to be interrupted
- +
- + utils.c:: andreas
- + (quit): handle interrupts
- +
- + dbxread.c:: andreas
- + handle gcc-2 symbol table extensions
- +
- + findvar.c:: andreas
- + correctly handle function types
- +
- + infcmd.c:: andreas
- + (run_command): avoid confusion after user tried to
- + start program again
- + (finish_command): correctly handle function return type
- +
- + main.c:: andreas
- + (Save_all_vectors): Setexc(N,-1) does work
- +
- + source.c:: andreas
- + (directory_command): correctly handle atari-like
- + absolute file names
- +
- + ------------------------------- Patchlevel 18 -----------------------------
- *** 1.10 1992/03/09 18:12:41
- --- PatchLev.h 1992/04/19 16:36:09
- ***************
- *** 1,4 ****
- ! #define PatchLevel "17"
-
- /*
- * the Patch Level above is to identify the version
- --- 1,4 ----
- ! #define PatchLevel "18"
-
- /*
- * the Patch Level above is to identify the version
- *** 1.11 1992/03/09 18:12:41
- --- README 1992/04/19 16:36:10
- ***************
- *** 1,3 ****
- --- 1,15 ----
- + GDB @ Patchlevel 18
- +
- + - many of you had difficulty with finding gdb @Patchlevel 16
- + to patch to PL 17 with the last set of diffs. I apologize for
- + this. gdb@pl 17 is now available on atari.archive.umich.edu
- + for you to apply the 17->18 diffs.
- +
- + - many small bug fixes.
- +
- + - gdb -L is not working reliably. i still have'nt tracked this down.
- + But other than that gdb is doing quite well.
- +
- GDB @ Patchlevel 17
- - gdb -L (logging) now always works independent of TOS etc.
-
- *** 1.19 1992/01/29 16:45:54
- --- atarist.c 1992/04/19 16:36:10
- ***************
- *** 111,121 ****
- p = kludge_env = xmalloc(envlen);
-
- for (i = 0; env[i]; i++)
- ! {
- ! for (q = env[i]; *q; q++)
- *p++ = *q;
- *p++ = '\0';
- ! }
- *p = '\0';
-
- /* the obligatory cmd line parsing */
- --- 111,148 ----
- p = kludge_env = xmalloc(envlen);
-
- for (i = 0; env[i]; i++)
- ! {
- ! /*
- ! * NOTE: in main.c, we converted the PATH environment variable into
- ! * POSIX form. Here, we convert back into gulam form. Note that the
- ! * new variable will be shorter than the old, so space is not a
- ! * problem.
- ! */
- ! if (!strncmp (env[i], "PATH=", 5))
- ! {
- ! strncpy (p, env[i], 5);
- ! p += 5;
- ! for (q = env[i] + 5; *q; q++)
- ! {
- ! if (!strncmp (q, "/dev/", 5) && q[5])
- ! {
- ! *p++ = q[5];
- ! *p++ = ':';
- ! q += 5;
- ! }
- ! else if (*q == ':')
- ! *p++ = ',';
- ! else if (*q == '/')
- ! *p++ = '\\';
- ! else
- ! *p++ = *q;
- ! }
- ! }
- ! else
- ! for (q = env[i]; *q; q++)
- *p++ = *q;
- *p++ = '\0';
- ! }
- *p = '\0';
-
- /* the obligatory cmd line parsing */
- ***************
- *** 174,179 ****
- --- 201,208 ----
- /* we're returning after the child exits. the stack
- is all fucked here, so reset to top level */
- child_is_running = 0;
- + fprintf(stderr, "Program exitted with status %ld\n",
- + kludge_pexec_result);
- exception_number = SIGTRACE; /* not really... */
- inferior_died(); /* I think this is safe here */
- return_to_top_level(); /* clean up stack and restart */
- ***************
- *** 216,229 ****
- trap #1
- movel d0,_kludge_pexec_result");
- #endif
- - /* DO NOT REMOVE THIS PRINTF!!!
- - For reasons I can't divine, it causes GDB to wedge totally
- - when the child program exits. If anybody ever figures this out,
- - please let me know!
- - */
- - fprintf_filtered(stderr, "Program exitted with status 0x%lx\n",
- - kludge_pexec_result);
- -
-
- #if 0
- free(kludge_env);
- --- 245,250 ----
- ***************
- *** 257,265 ****
-
- #if 1 /* def JRDLIB */
- /* called various places */
- ! int kill(fake_pid)
- int fake_pid;
- {
- if (fake_pid == CHILD_PID_KLUDGE)
- {
- /* if the child is running, then TOS thinks we're it, so just exit */
- --- 278,289 ----
-
- #if 1 /* def JRDLIB */
- /* called various places */
- ! int kill(fake_pid, signal)
- int fake_pid;
- + int signal;
- {
- + extern void request_quit();
- +
- if (fake_pid == CHILD_PID_KLUDGE)
- {
- /* if the child is running, then TOS thinks we're it, so just exit */
- ***************
- *** 269,274 ****
- --- 293,303 ----
- else
- fprintf_filtered(stderr, "Internal error: attempt to kill when child not running\n");
- }
- + else if (fake_pid == getpid ())
- + {
- + if (signal == SIGINT)
- + request_quit();
- + }
- else
- fprintf_filtered(stderr, "You can't kill pid %d, bozo!\n", fake_pid);
-
- ***************
- *** 309,314 ****
- --- 338,344 ----
- char *regex;
- {
- regcomp_error = NULL;
- + if (compiled_regex) free(compiled_regex);
- if (compiled_regex = regcomp(regex))
- return NULL;
- else
- ***************
- *** 459,477 ****
- fprintf_filtered(stderr, "Child is not running\n");
- }
-
- /* read a 32-bit word from child memory */
- st_child_read_word(addr)
- ! long * addr;
- {
- long result;
-
- ! /* fprintf_filtered(stderr, "st_child_read_word %X", addr); */
- ! /* be sure addr is within child memory to prevent bus errors */
- ! if (addr >= child_tpa->text_base - 1 && addr < child_tpa->memtop + 1)
- ! result = *addr;
- ! else
- ! result = 0;
- ! /* fprintf_filtered(stderr, "->%X\n", result); */
- return(result);
- }
-
- --- 489,513 ----
- fprintf_filtered(stderr, "Child is not running\n");
- }
-
- + void st_bus_error_handler ()
- + {
- + asm volatile ("andw #~0x2000,sr");
- + error ("Bus error while reading from or writing to child memory.");
- + }
- +
- /* read a 32-bit word from child memory */
- st_child_read_word(addr)
- ! volatile long * addr;
- {
- long result;
- + long old_buserror;
-
- ! /* fprintf(stderr, "st_child_read_word %X", addr); */
- ! /* report bus errors */
- ! old_buserror = (long) Setexc (2, st_bus_error_handler);
- ! result = *addr;
- ! (void) Setexc (2, old_buserror);
- ! /* fprintf(stderr, "->%X\n", result); */
- return(result);
- }
-
- ***************
- *** 478,489 ****
- /* write a 32-bit word to child mem */
- st_child_write_word(addr, value)
- long * addr;
- ! long value;
- {
- ! /* fprintf_filtered(stderr, "st_child_write_word %X <- %X\n", addr, value); */
- ! /* be sure addr is within child memory to prevent bus errors */
- ! if (addr >= child_tpa->text_base - 1 && addr < child_tpa->memtop + 1)
- ! *addr = value;
- }
-
- #define DEBUG 1
- --- 514,527 ----
- /* write a 32-bit word to child mem */
- st_child_write_word(addr, value)
- long * addr;
- ! volatile long value;
- {
- ! long old_buserror;
- ! /* fprintf(stderr, "st_child_write_word %X <- %X\n", addr, value); */
- ! /* report bus errors */
- ! old_buserror = (long) Setexc (2, st_bus_error_handler);
- ! *addr = value;
- ! (void) Setexc (2, old_buserror);
- }
-
- #define DEBUG 1
- *** 1.15 1992/01/29 16:45:54
- --- dbxread.c 1992/04/19 16:36:13
- ***************
- *** 1110,1116 ****
- register struct misc_bunch *new;
-
- #ifdef atarist
- ! if(strcmp(name, "gcc_compiled.") == 0)
- return;
- #endif
-
- --- 1110,1117 ----
- register struct misc_bunch *new;
-
- #ifdef atarist
- ! if (strcmp (name, "gcc_compiled.") == 0 ||
- ! strcmp (name, "gcc2_compiled.") == 0)
- return;
- #endif
-
- ***************
- *** 1897,1902 ****
- --- 1898,1909 ----
- and possibly more stuff to define the type
- (all of which is handled by read_type) */
-
- + if (deftype == 'T' && *p == 't')
- + {
- + deftype = 't';
- + p++;
- + }
- +
- if (deftype == 'p' && *p == 'F')
- /* pF is a two-letter code that means a function parameter in Fortran.
- The type-number specifies the type of the return value.
- ***************
- *** 2335,2340 ****
- --- 2342,2348 ----
- break;
-
- case '*':
- + case '&':
- #if 0
- type1 = read_type (pp);
- if (TYPE_POINTER_TYPE (type1))
- ***************
- *** 2655,2661 ****
- --- 2663,2673 ----
-
- /* Now fill in the fields of the type-structure. */
-
- + #ifdef atarist
- + TYPE_LENGTH (type) = gcc_mshort ? sizeof (short) : sizeof (int);
- + #else
- TYPE_LENGTH (type) = sizeof (int);
- + #endif
- TYPE_CODE (type) = TYPE_CODE_ENUM;
- TYPE_NFIELDS (type) = nsyms;
- TYPE_FIELDS (type) = (struct field *) obstack_alloc (symbol_obstack, sizeof (struct field) * nsyms);
- ***************
- *** 2678,2685 ****
- struct symbol *sym = syms->symbol[j];
- SYMBOL_TYPE (sym) = type;
- TYPE_FIELD_NAME (type, n) = SYMBOL_NAME (sym);
- ! TYPE_FIELD_VALUE (type, n) = 0;
- ! TYPE_FIELD_BITPOS (type, n) = SYMBOL_VALUE (sym);
- TYPE_FIELD_BITSIZE (type, n++) = 0;
- }
- if (syms == osyms)
- --- 2690,2697 ----
- struct symbol *sym = syms->symbol[j];
- SYMBOL_TYPE (sym) = type;
- TYPE_FIELD_NAME (type, n) = SYMBOL_NAME (sym);
- ! TYPE_FIELD_BITPOS (type, n) = 0;
- ! TYPE_FIELD_VALUE (type, n) = SYMBOL_VALUE (sym);
- TYPE_FIELD_BITSIZE (type, n++) = 0;
- }
- if (syms == osyms)
- ***************
- *** 2745,2751 ****
- return builtin_type_unsigned_int;
- }
- #ifdef atarist
- - /* special case for -mshort */
- else if (n2 == -32768 && n3 == 32767 && typenums[1] == 1)
- {
- gcc_mshort = 1;
- --- 2757,2762 ----
- *** 1.5 1992/01/14 20:05:42
- --- findvar.c 1992/04/19 16:36:16
- ***************
- *** 213,220 ****
- --- 213,222 ----
- int val = SYMBOL_VALUE (var);
- register int len;
-
- + #if 0
- if (SYMBOL_CLASS (var) == LOC_BLOCK)
- type = lookup_function_type (type);
- + #endif
-
- v = allocate_value (type);
- VALUE_LVAL (v) = lval_memory; /* The most likely possibility. */
- ***************
- *** 361,368 ****
- --- 363,372 ----
-
- if (frame == 0) frame = selected_frame;
-
- + #if 0
- if (SYMBOL_CLASS (var) == LOC_BLOCK)
- type = lookup_function_type (type);
- + #endif
-
- switch (SYMBOL_CLASS (var))
- {
- *** 1.10 1991/11/30 17:37:25
- --- infcmd.c 1992/04/19 16:36:19
- ***************
- *** 197,208 ****
- }
-
- allargs = concat ("exec ", exec_file, inferior_args);
- inferior_pid = create_inferior (allargs, environ_vector (inferior_environ));
-
- ! #ifdef atarist
- ! if(inferior_pid == -9999)
- ! error("Program already started or run once. Cannot restart program on\
- ! the atariST.\nExit GDB and start again if you want to do this.");
- #endif
- }
-
- --- 197,212 ----
- }
-
- allargs = concat ("exec ", exec_file, inferior_args);
- + #ifndef atarist
- inferior_pid = create_inferior (allargs, environ_vector (inferior_environ));
- + #else
- + i = create_inferior (allargs, environ_vector (inferior_environ));
- + if (i == -9999)
- + error ("\
- + Program already started or run once. Cannot restart program on the atariST.\n\
- + Exit GDB and start again if you want to do this.");
-
- ! inferior_pid = i;
- #endif
- }
-
- ***************
- *** 561,570 ****
- --- 565,579 ----
- if (!value_type)
- fatal ("internal: finish_command: function has no target type");
-
- + #if 0
- if (TYPE_CODE (SYMBOL_TYPE (function)) != TYPE_CODE_VOID)
- value_type = SYMBOL_TYPE (function);
- else
- return;
- + #else
- + if (TYPE_CODE (value_type) == TYPE_CODE_VOID)
- + return;
- + #endif
-
- funcaddr = BLOCK_START (SYMBOL_BLOCK_VALUE (function));
-
- *** 1.7 1992/03/09 18:12:41
- --- main.c 1992/04/19 16:36:21
- ***************
- *** 531,536 ****
- --- 531,537 ----
- if(atari_logfile)
- {
- append_atari_logfile(line);
- + append_atari_logfile(" (previous command repeated)\n");
- }
- return line;
- }
- ***************
- *** 1312,1339 ****
-
- static void Save_all_vectors()
- {
- ! s_vectors[2] = set_exception_vector(2, do_nothing);
- ! /* akp: why does Setexc(-N,..) not work?? */
- ! set_exception_vector(2, s_vectors[2]);
- ! s_vectors[3] = set_exception_vector(3, do_nothing);
- ! set_exception_vector(3, s_vectors[3]);
- ! s_vectors[4] = set_exception_vector(4, do_nothing);
- ! set_exception_vector(4, s_vectors[4]);
- ! s_vectors[5] = set_exception_vector(5, do_nothing);
- ! set_exception_vector(5, s_vectors[5]);
- ! s_vectors[6] = set_exception_vector(6, do_nothing);
- ! set_exception_vector(6, s_vectors[6]);
- ! s_vectors[7] = set_exception_vector(7, do_nothing);
- ! set_exception_vector(7, s_vectors[7]);
- ! s_vectors[8] = set_exception_vector(8, do_nothing);
- ! set_exception_vector(8, s_vectors[8]);
- ! s_vectors[9] = set_exception_vector(9, do_nothing);
- ! set_exception_vector(9, s_vectors[9]);
-
- ! s_trap_0_vector = set_exception_vector(32, do_nothing);
- ! set_exception_vector(32, s_trap_0_vector);
- ! s_trap_f_vector = set_exception_vector(47, do_nothing);
- ! set_exception_vector(47, s_trap_f_vector);
- }
-
- static void Restore_all_vectors()
- --- 1313,1329 ----
-
- static void Save_all_vectors()
- {
- ! s_vectors[2] = set_exception_vector(2, -1L);
- ! s_vectors[3] = set_exception_vector(3, -1L);
- ! s_vectors[4] = set_exception_vector(4, -1L);
- ! s_vectors[5] = set_exception_vector(5, -1L);
- ! s_vectors[6] = set_exception_vector(6, -1L);
- ! s_vectors[7] = set_exception_vector(7, -1L);
- ! s_vectors[8] = set_exception_vector(8, -1L);
- ! s_vectors[9] = set_exception_vector(9, -1L);
-
- ! s_trap_0_vector = set_exception_vector(32, -1L);
- ! s_trap_f_vector = set_exception_vector(47, -1L);
- }
-
- static void Restore_all_vectors()
- *** 1.7 1991/11/30 17:37:25
- --- source.c 1992/04/19 16:36:24
- ***************
- *** 190,196 ****
- }
-
- #ifdef atarist
- ! if (((dirname[0] != '\\') || (dirname[0] != '/')) && (dirname[1] != ':'))
- dirname = concat (current_directory, "\\", dirname);
- #else
- if (dirname[0] != '/')
- --- 190,196 ----
- }
-
- #ifdef atarist
- ! if ((dirname[0] != '\\') && (dirname[0] != '/') && (dirname[1] != ':'))
- dirname = concat (current_directory, "\\", dirname);
- #else
- if (dirname[0] != '/')
- *** 1.10 1991/11/30 17:37:25
- --- symtab.c 1992/04/19 16:36:27
- ***************
- *** 49,54 ****
- --- 49,58 ----
- struct type *builtin_type_float;
- struct type *builtin_type_double;
-
- + #ifdef atarist
- + extern int gcc_mshort;
- + #endif
- +
- /* Lookup the symbol table of a source file named NAME. Try a couple
- of variations if the first lookup doesn't work. */
-
- ***************
- *** 121,126 ****
- --- 125,135 ----
- if (sym == 0 || SYMBOL_CLASS (sym) != LOC_TYPEDEF)
- {
- if (!strcmp (name, "int"))
- + #ifdef atarist
- + if (gcc_mshort)
- + return builtin_type_short;
- + else
- + #endif
- return builtin_type_int;
- if (!strcmp (name, "long"))
- return builtin_type_long;
- ***************
- *** 147,152 ****
- --- 156,166 ----
- char *name;
- {
- if (!strcmp (name, "int"))
- + #ifdef atarist
- + if (gcc_mshort)
- + return builtin_type_unsigned_short;
- + else
- + #endif
- return builtin_type_unsigned_int;
- if (!strcmp (name, "long"))
- return builtin_type_unsigned_long;
- *** 1.6 1991/11/30 17:37:25
- --- utils.c 1992/04/19 16:36:27
- ***************
- *** 222,228 ****
- ioctl (fileno (stdout), TIOCFLUSH, 0);
- #endif
- #endif /* not HAVE_TERMIO */
- ! #ifdef TIOCGPGRP
- error ("Quit");
- #else
- error ("Quit (expect signal %d when inferior is resumed)", SIGINT);
- --- 222,228 ----
- ioctl (fileno (stdout), TIOCFLUSH, 0);
- #endif
- #endif /* not HAVE_TERMIO */
- ! #if defined (TIOCGPGRP) || defined (atarist)
- error ("Quit");
- #else
- error ("Quit (expect signal %d when inferior is resumed)", SIGINT);
-